From: Andrew Cooper Date: Wed, 1 Mar 2017 18:22:31 +0000 (+0000) Subject: tools/fuzz: Include LLVMFuzzerTestOneInput() in the generated .a X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2446 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=3a54f724912d4ed976d3be1a8c549918a5ef5245;p=xen.git tools/fuzz: Include LLVMFuzzerTestOneInput() in the generated .a Otherwise they are not suitable for use with libfuzz. Signed-off-by: Andrew Cooper Reviewed-by: Wei Liu --- diff --git a/tools/fuzz/libelf/Makefile b/tools/fuzz/libelf/Makefile index c884703ff0..6cdc31eeb5 100644 --- a/tools/fuzz/libelf/Makefile +++ b/tools/fuzz/libelf/Makefile @@ -13,7 +13,7 @@ $(ELF_LIB_OBJS): CFLAGS += -DFUZZ_NO_LIBXC $(CFLAGS_xeninclude) libelf-fuzzer.o: CFLAGS += $(CFLAGS_xeninclude) -libelf.a: $(ELF_LIB_OBJS) +libelf.a: libelf-fuzzer.o $(ELF_LIB_OBJS) $(AR) rc $@ $^ .PHONY: libelf-fuzzer-all diff --git a/tools/fuzz/x86_instruction_emulator/Makefile b/tools/fuzz/x86_instruction_emulator/Makefile index 673b5f042d..abba186bcc 100644 --- a/tools/fuzz/x86_instruction_emulator/Makefile +++ b/tools/fuzz/x86_instruction_emulator/Makefile @@ -30,7 +30,7 @@ x86_emulate.o: x86_emulate.c x86_emulate/x86_emulate.c $(x86_emulate.h) x86-insn-emulator-fuzzer.o: $(x86_emulate.h) -x86-insn-emulator.a: x86_emulate.o +x86-insn-emulator.a: x86-insn-emulator-fuzzer.o x86_emulate.o $(AR) rc $@ $^ afl-x86-insn-emulator-fuzzer: afl-x86-insn-emulator-fuzzer.o x86-insn-emulator-fuzzer.o x86_emulate.o